<!DOCTYPE HTML>
<html lang="zh-cn"
      xmlns:th="http://www.thymeleaf.org" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <META HTTP-EQUIV="Pragma" CONTENT="no-cache"/>
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache"/>
    <META HTTP-EQUIV="Expires" CONTENT="0"/>

    <title>目录页</title>
    <link href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet"/>
</head>
<body onload="index_click()">
<!--VUE-->
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="http://cdn.bootcss.com/jquery/1.11.1/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>

<div class="container">
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse"
                        data-target="#example-navbar-collapse">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Logo</a>
            </div>
        </div>
    </nav>
    <div class="col-sm-2 col-xs-12">
        <nav class="navbar navbar-default" role="navigation">
            <div class="collapse navbar-collapse my-left-block-div" id="example-navbar-collapse">
                <ul class="nav navbar-nav my-menu">
                    <li class="active"><a href="#" onclick="index_click()">主页</a></li>
                    <li><a href="#" onclick="bbs_click()">留言板</a></li>
                    <li><a href="#">一些随笔</a></li>
                    <li><a href="#">一些博文</a></li>
                    <li><a href="#" onclick="on_ability_click()">能力图表</a></li>
                </ul>
            </div>
        </nav>
    </div>
    <div class="col-sm-10 col-xs-12">
        <div id="app" class="list-group">
            <a v-for="essay in essays" v-bind:href="essay.url" class="list-group-item">{{ essay.title }}</a>
        </div>
    </div>

</div>
</body>
<script>
    var the_essays = [
                {
                    title: "test0",
                    url: "www.baidu.com"
                }, {
                    title: "test1",
                    url: "www.baidu.com"
                }, {
                    title: "test2",
                    url: "www.baidu.com"
                }, {
                    title: "test3",
                    url: "www.baidu.com"
                }
            ];

    //vue
    new Vue({
        el: "#app",
        data: {
            essays : the_essays
        }
    })
</script>
</html>